function [y] = ModifiedObj(ObjValue,x,step)
%UNTITLED5 Summary of this function goes here
%   Detailed explanation goes here
%% 
[xn,d] = size(x);
step = step*ones(1,d);
y = zeros(xn,2);
y(:,1) = ObjValue(x);
for i = 1:xn
    %% Deb(2010), Orthogonal neighboring points, n = (2^d+1)*n
%     x_neighbor = fullfact(ones(1,d).*2).*2-3;
%     x_neighbor = x_neighbor.*repmat(step,[size(x_neighbor,1),1]);
%     x_neighbor = x_neighbor+repmat(x(i,:),[size(x_neighbor,1),1]);
%     f_neighbor = ObjValue(x_neighbor);
%     y(i,2) = sum(f_neighbor<y(i,1));
    %% Deb(2010), Hooke-Jeeve�s Exploratory Search, n = (2d+1)*n
    xc = x(i,:);
    fc = y(i,1);
    for j = 1:d
        x_neighbor = repmat(xc,[2,1]);
        x_neighbor(:,j) = x_neighbor(:,j)+([1;-1]).*step;
        f_neighbor = ObjValue(x_neighbor);
        y(i,2) = y(i,2) + sum(f_neighbor<y(i,1));
        if min(f_neighbor)<fc
            if f_neighbor(1)<f_neighbor(2)
                xc = x_neighbor(1,:);
                fc = f_neighbor(1);
            else
                xc = x_neighbor(2,:);
                fc = f_neighbor(2);
            end
        end
    end
end
% budget = budget*(1+d^2)
end

